<?php
/**
 * User zgh
 * Email 1803897171@qq.com
 * Date 2021/7/30
 **/

namespace app\admin\controller;

use app\admin\service\SmsService;
use app\common\Annotation\ControllerAnnotation;
use app\common\Annotation\NodeAnotation;
use app\common\controller\BackendController;
use think\facade\Request;

/**
 * @ControllerAnnotation(title="短信管理",auth=2)
 * Class SmsController
 * @package app\admin\controller
 */
class SmsController extends BackendController
{
    /**
     * @NodeAnotation(title="列表")
     * @return mixed|\think\response\Json
     */
    public function index()
    {
        if(Request::isAjax()){
            $result = SmsService::getList(Request::param());
            return success_json_response("成功", $result['dataList'], ['count' => $result['total']]);
        }else{
            return $this->fetch();
        }
    }
}